#pragma once

#include "SmartPtr.h"

namespace fastbird
{
	class Timer : public ReferenceCounter
	{
	public:
		Timer();	
		~Timer();

	public:
		typedef float TIME_PRECISION;

		virtual void Tick();
		virtual TIME_PRECISION GetTime();
		virtual TIME_PRECISION GetDeltaTime();		
		virtual void Reset();
		virtual __int64 GetTickCount();
		inline virtual __int64 GetFreq() const;

	private:
		LARGE_INTEGER mFreq;
		LARGE_INTEGER mBase;
		TIME_PRECISION mStartTime;
		TIME_PRECISION mDeltaTime;
		TIME_PRECISION mTime;
	};
	extern Timer* gpTimer;
}